package com.zfdang.touchhelper.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.zfdang.touchhelper.service.TouchHelperService;
import com.zfdang.touchhelper.config.LyActionTypeConfig;
import com.zfdang.touchhelper.tool.LyLog;

/**
 *  broadcast receiver for   device unlock
 * @author ly-dengpw
 */
public class UserPresentReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if(action.equals(Intent.ACTION_USER_PRESENT)) {
            LyLog.showLog("系统解锁，开始检测广告...");
            TouchHelperService.dispatchAction(LyActionTypeConfig.ACTION_START_SKIPAD);
        }
    }
}
